<?php
require_once(APPPATH.'views/components/page.php');
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<!-- Import this script manually to prevent page reloaded		 -->
		<script type='text/javascript' src='<?php echo base_url() ?>resources/js/ddaccordion.js'></script>
 		<?php
			$page = Page::getInstance();
			$error = $this->session->userdata('error');
			$this->session->unset_userdata('error');
			$promotion = isset($rpromotion) ? $rpromotion : 0;
			
			if ($error > ERROR_NONE)
				$title = "Lỗi";
			else
			{
				$title = $promotion ? "Khuyến mãi" : "Làm đẹp";
			}
			$page->generateHeader($title);
		?> 
	</head>
	
	<body>
		
 		<?php
			$page->openMainPageTag();
			
			$page->generateLeftPan();
			$page->generateNewsRightPan($newsarr, $paging_link, $promotion);
			
			$page->generateFooter();
			
			$page->closeMainPageTag();
		?>
		
	</body>
</html>